package Event.lib;

import Creature.Player;
import Event.Story;

public class Lottery extends Story {
    public Lottery(Player player) {
        super(player);
        eventName = "促销活动，你可以选择一种食物";
        happenText = "你的面前有一些食物，你可以选择一种食物。(其中一款食物需要付费)";
        options = new String[]{"统一老坛酸菜", "华莱士", "海底捞"};
    }

    @Override
    public void eventHappen(int option) {
        switch (option) {
            case 0:
                endText = "干净又卫生，再来一桶。";
                player.setHealth(player.getHealth() - 40);
                player.setHungry(player.getHungry()+10);
                break;
            case 1:
                endText = "恭喜你进化成喷射战士。";
                player.setHealth(player.getHealth() - 40);
                player.setHungry(player.getHungry()+10);
                break;
            case 2:
                endText = "你选中了付费食物，你需要支付100块,你感到非常心痛";
                player.setMoney(player.getMoney() - 100);
                player.setHungry(player.getHungry()+10);
                player.setSan(player.getSan() - 5);
                break;
        }
    }

    @Override
    public boolean canHappen(Player player) {
        return true;
    }



}
